<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/tld/eatrip.tld" prefix="eatrip" %>
<!DOCTYPE html>
<html>
	<head>
		<meta content="text/html; charset=UTF-8"/>
		<script type="text/javascript" src="js/jquery-1.7.1.js"></script>
		<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script> 
		<script type="text/javascript" src="js/jquery.swfobject.1-0-5.min.js"></script>
		<script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>
		<script type="text/javascript" src="js/jquery-ui-sliderAccess.js"></script>
		<link rel="stylesheet" media="screen" type="text/css" href="css/homepage.css" />
		<link rel="stylesheet" media="screen" type="text/css" href="css/footer.css" />
		<link rel="stylesheet" media="screen" type="text/css" href="css/redmond/jquery-ui-1.8.16.custom.css" />
		<title>eatrip</title>
		<script type="text/javascript">
			$(document).ready(function() {
				$("#datetimepick").datetimepicker({
					dateFormat : "yy-mm-dd"
				});
				$('#italia-map').flash({ 
				    swf: 'js/italia.swf', 
				    width: 450, 
				    height: 500, 
				    flashvars:{xmlFile: 'js/config.xml'} 
				});
				
			});
			
		</script>
		<style type="text/css">
			/* css for timepicker */
			.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
			.ui-timepicker-div dl { text-align: left; }
			.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
			.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
			.ui-timepicker-div td { font-size: 90%; }
			.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
		</style>
	</head>
	<body>
		<header>
			<span id="title">Eatrip</span>
			<fieldset>
				<form action="homepage.html" method="POST">
					<label>Username</label><input type="text" name="username" required="required"/>
					<label>Password</label><input type="password" name="password" required="required"/>
					<button type="submit">Invio</button>
				</form>
				<a href="registrazione.html">Registrazione</a>
			</fieldset>
			<tiles:insertAttribute name="navmenu"  />
		</header>
		<div id="container">
			<div id="left">
				<p>Sopri Ristoranti,Pizzerie,Osterie...</p>
				<p>Dov'è?</p>
				<form action="ricerca/comune/filtro/page/1" method="POST">
					<input type="text" name="luogoDaParam" required="required"/>
					<input type="submit" value="Cerca"/>
					<fieldset>
						<p>Avanzate</p>
						<table>
							<tr>
								<th><span>Ricevimenti</span></th>
								<th><input type="checkbox" name="ricevimenti" /></th>
								<th><span>Sky-Mediaset</span></th>
								<th><input type="checkbox" name="skyMediaset" /></th>
							</tr>
							<tr>
								<th><span>Parcheggio</span></th>
								<th><input type="checkbox" name="parcheggio" /></th>
								<th><span>All'aperto</span></th>
								<th><input type="checkbox" name="allAperto" /></th>
							</tr>
							<tr>
								<th><span>Celiaci</span></th>
								<th><input type="checkbox" name="celiaci" /></th>
								<th><span>Live Music</span></th>
								<th><input type="checkbox" name="musicaDalVivo" /></th>
							</tr>
							<tr>
								<th><span>Vista Mare</span></th>
								<th><input type="checkbox" name="vistaMare" /></th>
								<th><span>Sala Fumatori</span></th>
								<th><input type="checkbox" name="salaFumatori" /></th>
							</tr>
							<tr>
								<th><span>Animali</span></th>
								<th><input type="checkbox" name="animali" /></th>
								<th><span>Wifi</span></th>
								<th><input type="checkbox" name="wifi" /></th>
							</tr>
							<tr>
								<th><span>Da Asporto</span></th>
								<th><input type="checkbox" name="daAsporto" /></th>
							    <th><span>Cucina Tipica</span></th>
								<th><input type="checkbox" name="cucinaTipica" /></th>
							</tr>
						</table>
					</fieldset>
				</form>
			</div>
			<div id="center">
				<div id="italia-map"></div>
			</div>
			<div id="right">
				<p>Dimmi dove mangi e ti dirò cosa fare o vedere</p>
				<p>Dov'è?</p>
				<form action="attrazioni/1" method="POST">
					<input type="text" name="luogo" required="required"/>
					<input type="submit" value="Cerca"/>
				</form>
			</div>
			<div id="under-container">
				<div id="under-left">
					<p>Best Eatrip</p>
					<label>
						<c:forEach var="locale" items="${datiLocali}">
							<!--<c:out value="${locale}"></c:out>-->
							<eatrip:locale locale="${locale}" miniDettagli="true" path="locale/idLocale/${locale.idLocale}" />
						</c:forEach>
					</label>
				</div>
				<div id="under-center">
					<p>Prodotti tipici</p>
					<label>
						<c:out value="${prodottoTipico}"></c:out>
					</label>
					<p>Ricetta del giorno</p>
					<div class="ricetta-day">
						<eatrip:ricetta ricette="${ricetta}" basePathImage="/eatrip/"/>
					</div>
				</div>
				<div id="under-right">
					<p>Vi organizziamo il weekend !!</p>
					<p>Dov'è?</p>
					<form action="" method="POST">
						<input type="text" name="luogo" required="required"/>
						<input type="datetime" id="datetimepick" name="data" required="required"/> 
						<input type="submit" value="Cerca"/>
					</form>
				</div>	
			</div>
			<tiles:insertAttribute name="footer"/>
		</div>
	</body>
</html>